package com.power.bank.member.service.impl;

import java.util.List;
import com.power.bank.common.utils.DateUtils;
import com.power.bank.member.domain.PbMemberCapitalLog;
import com.power.bank.member.mapper.PbMemberCapitalLogMapper;
import com.power.bank.member.service.IPbMemberCapitalLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 钱包记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-13
 */
@Service
public class PbMemberCapitalLogServiceImpl implements IPbMemberCapitalLogService
{
    @Autowired
    private PbMemberCapitalLogMapper pbMemberCapitalLogMapper;

    /**
     * 查询钱包记录
     * 
     * @param id 钱包记录主键
     * @return 钱包记录
     */
    @Override
    public PbMemberCapitalLog selectPbMemberCapitalLogById(Long id)
    {
        return pbMemberCapitalLogMapper.selectPbMemberCapitalLogById(id);
    }

    /**
     * 查询钱包记录列表
     * 
     * @param pbMemberCapitalLog 钱包记录
     * @return 钱包记录
     */
    @Override
    public List<PbMemberCapitalLog> selectPbMemberCapitalLogList(PbMemberCapitalLog pbMemberCapitalLog)
    {
        return pbMemberCapitalLogMapper.selectPbMemberCapitalLogList(pbMemberCapitalLog);
    }

    /**
     * 新增钱包记录
     * 
     * @param pbMemberCapitalLog 钱包记录
     * @return 结果
     */
    @Override
    public int insertPbMemberCapitalLog(PbMemberCapitalLog pbMemberCapitalLog)
    {
        pbMemberCapitalLog.setCreateTime(DateUtils.getNowDate());
        return pbMemberCapitalLogMapper.insertPbMemberCapitalLog(pbMemberCapitalLog);
    }

    /**
     * 修改钱包记录
     * 
     * @param pbMemberCapitalLog 钱包记录
     * @return 结果
     */
    @Override
    public int updatePbMemberCapitalLog(PbMemberCapitalLog pbMemberCapitalLog)
    {
        pbMemberCapitalLog.setUpdateTime(DateUtils.getNowDate());
        return pbMemberCapitalLogMapper.updatePbMemberCapitalLog(pbMemberCapitalLog);
    }

    /**
     * 批量删除钱包记录
     * 
     * @param ids 需要删除的钱包记录主键
     * @return 结果
     */
    @Override
    public int deletePbMemberCapitalLogByIds(Long[] ids)
    {
        return pbMemberCapitalLogMapper.deletePbMemberCapitalLogByIds(ids);
    }

    /**
     * 删除钱包记录信息
     * 
     * @param id 钱包记录主键
     * @return 结果
     */
    @Override
    public int deletePbMemberCapitalLogById(Long id)
    {
        return pbMemberCapitalLogMapper.deletePbMemberCapitalLogById(id);
    }
}
